From: Florian Müllner Date: Mon, 7 Sep 2026 18:39:01 +0000 (+0200) Subject: automountManager: Cancel operations on disable X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~6^2^2~18 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=87f9346d281c3739eac9f68e1e877a684867bdff;p=gnome-shell.git automountManager: Cancel operations on disable We stop monitoring volumes when disabling automounts, but active operations remain in place. As a result, it is possible for mount password dialogs to show on the lock screen. This is at least unexpected, so use a cancellable to make sure ongoing operations are aborted when the automount manager is disabled. Part-of: (cherry picked from commit fea948928fe5885c1f0e8c5b928d753dfb1c57a8) --- diff --git a/js/ui/components/automountManager.js b/js/ui/components/automountManager.js index 5ea1e2e12..63255c83a 100644 --- a/js/ui/components/automountManager.js +++ b/js/ui/components/automountManager.js @@ -29,6 +29,8 @@ class AutomountManager { } enable() { + this._cancellable = new Gio.Cancellable(); + this._volumeMonitor.connectObject( 'volume-added', this._onVolumeAdded.bind(this), 'volume-removed', this._onVolumeRemoved.bind(this), @@ -41,6 +43,9 @@ class AutomountManager { } disable() { + this._cancellable?.cancel(); + this._cancellable = null; + this._volumeMonitor.disconnectObject(this); if (this._mountAllId > 0) { @@ -176,7 +181,7 @@ class AutomountManager { const mountOp = operation?.mountOp ?? null; this._activeOperations.set(volume, operation); - volume.mount(0, mountOp, null, + volume.mount(0, mountOp, this._cancellable, this._onVolumeMounted.bind(this)); }